﻿using System.Globalization;
using System.Windows.Data;

namespace CourseManagerment.Converter
{
    internal class GenderConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            //未选中状态
            if (value == null || parameter == null)
                return false;
            return value.ToString() == parameter.ToString();
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return parameter;
        }
    }
}
